package per.turtle.common.mq.clients;

import lombok.RequiredArgsConstructor;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Component;
import per.turtle.common.mq.constant.RabbitConstant;

/**
 * 发送者
 *
 * @author yuj
 */
@Component
@RequiredArgsConstructor
public class RabbitSender {

    private final AmqpTemplate rabbitTemplate;

    public void send(String context) {
        this.rabbitTemplate.convertAndSend(RabbitConstant.IP_ADDRESS_QUEUE, context);
    }

}
